package top.guagua.web.view;

import org.springframework.web.servlet.view.freemarker.FreeMarkerView;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public class RichFreeMarkerView extends FreeMarkerView {

    public static final String CONTEXT_PATH = "base";

    @Override
    @SuppressWarnings("unchecked")
    protected void exposeHelpers(Map model, HttpServletRequest request) throws Exception {
        super.exposeHelpers(model, request);
        model.put(CONTEXT_PATH, request.getContextPath());
    }

}
